#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File    :   ftnd.py
@Time    :   2020/11/27
@Author  :   wenke wang
@Version :   1.0
@Desc    :   FTND烟草依赖评估
'''

# here put the import lib
from ftnd_eval_param import FtndEvalParam

def evaluate(param):
    """
    FTND烟草依赖评估
    """
    total_score = param.first_smoking_time + param.hard_to_control + param.unwilling_to_giveup \
        + param.smoking_num_everyday + param.more_than_other_times + param.smoking_during_illness
    
    risk = "high" if total_score > 6 and total_score <= 7 else "middle" if total_score > 3 and total_score <= 6 else "low"
    return { "score": total_score, "risk": risk }

if __name__ == "__main__":
    param = FtndEvalParam(2, 0, 0, 1, 0, 1)
    result = evaluate(param)
    print(result)